package core;

import org.jdom.Element;

public abstract class Savable {
	protected Element xmlNode = null;
	
	protected Savable(Element xmlElt){
		xmlNode = xmlElt;
	}

	public void detach(){
		if (xmlNode != null){
			xmlNode.detach();
			xmlNode = null;
		}
	}
	
	final public void save(){
		save(true);
	}
	abstract public void save(boolean saveXml);
}
